package com.fiberhome.ztelauncher.xml.bean;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

import java.util.List;

/**
 * Created by Deed on 2018/3/19.
 */
@XStreamAlias("LauncherData")
public class LaunchDataCommon {
    @XStreamAsAttribute
    public String version;
    @XStreamAlias("Navs")
    public Navs navs;
    @XStreamAlias("Shortcuts")
    public Shortcuts shortcuts;

    public static class Navs {

        @XStreamAsAttribute
        public String backImg;
        @XStreamAsAttribute
        public String fontStyle;
        @XStreamAsAttribute
        public int fontSize;
        @XStreamAsAttribute
        public String fontColor;
        @XStreamAsAttribute
        public int position;
        @XStreamAsAttribute
        public int pageSwitch;
        @XStreamAsAttribute
        public int menupos;

        @XStreamImplicit(itemFieldName = "Nav")
        public List<Nav> navs;
    }

    public static class Nav {
        @XStreamAsAttribute
        public String id;
        @XStreamAsAttribute
        public boolean defaultfocus;
        @XStreamAlias("Name")
        public String name;
        @XStreamAlias("Img")
        public String img;
        @XStreamAlias("BackGroundImg")
        public String backGroundImg;
        @XStreamAlias("FocusImg")
        public String focusImg;
    }

    public static class Shortcuts {
        @XStreamImplicit(itemFieldName = "Shortcut")
        public List<Shortcut> shortcuts;
    }

    public static class Shortcut {
        @XStreamAsAttribute
        public String id;
        @XStreamAsAttribute
        public String type;
        @XStreamAsAttribute
        public boolean canfocus;
        @XStreamAlias("Name")
        public String name;
        @XStreamAlias("Img")
        public String img;
        @XStreamAlias("FocusImg")
        public String focusImg;
        @XStreamAlias("ElementAction")
        public ElementAction elementAction;
        @XStreamAlias("ExtraData")
        public ExtraData extraData;
    }

}
